import { request } from "./utils";

export function getHotelMenuList() {
  return request({
    url: "/hotel/menu/getList",
    method: "get"
  });
}
export function getHotelMenuTree() {
  return request({
    url: "/hotel/menu/tree",
    method: "get"
  });
}
export function getHotelMenuListByMenuId(menuId) {
  return request({
    url: "/hotel/menu/getMenuById/" + menuId,
    method: "get"
  });
}
export function getHotelMenuRoleId(roleId) {
  return request({
    url: "/hotel/menu/getRoleMenu/" + roleId,
    method: "get"
  });
}
export function getHotelMenuListByQuery(query) {
  return request({
    url: "/hotel/menu/list",
    method: "get",
    params: query
  });
}
export function addHotelMenu(data) {
  return request({
    url: "/hotel/menu/add",
    method: "post",
    data: data
  });
}

export function updateHotelMenu(data) {
  return request({
    url: "/hotel/menu/edit",
    method: "put",
    data: data
  });
}
export function deleteHotelMenu(id) {
  return request({
    url: "/hotel/menu/delete/" + id,
    method: "delete"
  });
}
